<h2><%= current_user.name_or_email %></h2>

<div id="social-accounts">
  <% connected_providers = current_user.authorizations.map(&:provider) %>

  <%= connected_providers %>

  <% @providers.each do |provider| %>
    <% class_str = "#{provider}-connect " %>
    <% class_str += (connected_providers.include? provider.to_s.capitalize) ? "connected" : "can-connect" %>

    <div class="<%= class_str %>">
      <%= link_to "#{provider.to_s.capitalize}", "/users/auth/#{provider.to_s}?user=#{current_user.id}" %>
    </div>
  <% end %>
</div>

<%= link_to t('navigation.links.edit'), citygate.edit_user_registration_path %>
